<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
use Watson\Validating\ValidatingTrait;

class WechatUserRecord extends Model
{
    use Notifiable;
    use ValidatingTrait;
    protected $table = 'wechat_user_records';

    public static $types = [
        '0'=>'其他合计', '1'=>'公众号搜索','17'=>'名片分享',
        '30'=>'扫描二维码','43'=>'图文页右上角菜单',
        '51'=>'支付后关注','57'=>'图文页内公众号名称',
        '75'=>'公众号文章广告', '78'=>'朋友圈广告'];

    //
    protected $fillable = [
        "ref_date", "user_source", "new_user","cancel_user","w_id","times"
    ];
    protected $rules = [
//        'name' => 'required|max:200',
    ];
    protected $validationMessages = [
//        'name.required' => '考试名称必填',
//        'name.max' => '考试名称长度不得超过20个字符',
//        'name.unique' => '该考试已经被注册过了'
    ];
}
